package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"gorm.io/gorm"
	"zeroOne/user_srv/api/internal/config"
	"zeroOne/user_srv/user_rpc/userrpc"
)

type ServiceContext struct {
	Config  config.Config
	UserRpc userrpc.UserRpc
	DB      *gorm.DB
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		UserRpc: userrpc.NewUserRpc(zrpc.MustNewClient(c.UserRpc)),
	}

}
